﻿@{
    ViewBag.Title = "送货明细查询";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.nbGridFor<MaterialDeliveryItem>(s =>
 {
     s.Action("DetailList");
     s.ExtParam(new { date = DateTime.Today });
     s.SummaryTemplate("送货量：<b>${DeliveryWeight}</b> 斤，总金额：<b>${Amount}</b> 元");
     s.layoutH(118);
     s.Columns(col =>
     {
         col.Bind(e => e.Id).IsKey();
         col.BindDateTime(e => e.Date).Width(70).AsSearch();
         col.BindEnum(m => m.SiteID, "ProjectSite").Title("项目点");
         col.BindEnum(e => e.Category, "MaterialCategory").Width(60);
         col.Bind(e => e.Code).Title("编号").Width(40);
         col.Bind(e => e.Name).Width(60).Align(GridAlign.Left).AsQuery().AsSearch();
         col.Bind(m => m.Price).Width(30).Title("价格").Align(GridAlign.Right);
         col.BindEnum(m => m.Unit, "MaterialUnit").Title("单位").Width(30);
         col.Bind(m => m.DeliveryWeight).Width(50).Align(GridAlign.Right).Summary(SummaryType.Sum);
         col.Bind(m => m.Amount).Width(40).Title("金额").Align(GridAlign.Right).Summary(SummaryType.Sum);
         col.Bind(e => e.OrderWeight).Align(GridAlign.Right).Width(50);
         col.Bind(e => e.SignWeight).Align(GridAlign.Right).Width(50);
         col.BindEnum(e => e.State, "DishState").Width(70).AsSearch();
     });
     s.Buttons(b =>
     {
         b.Bind(GridButtonType.Import, "导出").OnClick("Export");
     });
 }))
<script type="text/javascript">
    function Export() {
        alert("正式上线之后才会能导出数据！");
    }
</script>
